<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // 工厂模式
        function Fn(light) {
            this.name = "1707B"
            this.count = 43
            this.qwe = "erte"
            this.wrw = 68465
            this.myname = "zhangsna"



            this.light = light
        }

        console.log(new Fn("开灯"))

        console.log(new Fn("关灯"))

    </script>
</body>

</html>